package org.space.galaxyCabinet.service.impl;

import org.space.galaxyCabinet.constant.ControlTypeConstants;
import org.space.galaxyCabinet.dao.FreightChannelControlDao;
import org.space.galaxyCabinet.domain.FreightChannel;
import org.space.galaxyCabinet.service.ChannelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class ChannelServiceImpl implements ChannelService {

    @Autowired
    private FreightChannelControlDao freightChannelControlDao;

    @Override
    public boolean selfInspection(FreightChannel freightChannel) {
        freightChannel.setControlType(ControlTypeConstants.SELF_INSPECTION);
        return freightChannelControlDao.selfInspection(freightChannel);
    }

    @Override
    public boolean out(FreightChannel freightChannel) {
        freightChannel.setControlType(ControlTypeConstants.GOOD_OUTPUT);
        return freightChannelControlDao.out(freightChannel);
    }
}
